﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Themes/Default/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<Fashion.Models.Product>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit Product
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Edit Product</h2>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>Fields</legend>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.ProductID) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.ProductID, new { @readonly = "true" })%>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.ProductName) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.ProductName) %>
                <%: Html.ValidationMessageFor(model => model.ProductName, "Name is required") %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Description) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Description) %>
                <%: Html.ValidationMessageFor(model => model.Description) %>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.CategoryID) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.CategoryID) %>
                <%: Html.ValidationMessageFor(model => model.CategoryID) %>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.BrandID) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.BrandID) %>
                <%: Html.ValidationMessageFor(model => model.BrandID) %>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.Sex) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Sex) %>
                <%: Html.ValidationMessageFor(model => model.Sex) %>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.Price) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Price, String.Format("{0:F}", Model.Price)) %>
                <%: Html.ValidationMessageFor(model => model.Price, "Price is required") %>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.Rating) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Rating, String.Format("{0:F}", Model.Rating)) %>
                <%: Html.ValidationMessageFor(model => model.Rating) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Likes) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Likes) %>
                <%: Html.ValidationMessageFor(model => model.Likes) %>
            </div>

             <div class="editor-label">
                <%: Html.LabelFor(model => model.DateAdded) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.DateAdded, String.Format("{0:dd/MM/yyyy}", Model.DateAdded))%>
                <%: Html.ValidationMessageFor(model => model.DateAdded) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.ImageList) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.ImageList) %>
                <%: Html.ValidationMessageFor(model => model.ImageList) %>
            </div>
            
            <p>
                <input type="submit" value="Update" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="Submenu" runat="server">
</asp:Content>

